#pragma once 

#include "Core\NervusSharedHeader.h"

#include "Render\CSprite.h"

namespace Nervus {
	namespace Render {
		class D3D9Sprite : public Sprite {
			friend class D3D9RenderSystem;
			friend class D3D9Mesh;

		private:
			vector<SpriteVertex> mVertices;
			D3D9RenderSystem* mRenderSystem;
			LPDIRECT3DTEXTURE9 mTexture;
			LPDIRECT3DVERTEXBUFFER9 mVertexBuffer;

			D3D9Sprite(void* renderer, D3DXVECTOR2 pos, Texture*);
			~D3D9Sprite();

			bool loadSprite();
		public:
			void renderSprite();
		};
	}
}